<!-- Modal -->
<#include "../../select.ftl" />
<div class="modal-dialog wide" style="width: 1300px;">
<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">
            <#if xcGsgj??>
                <#if xcGsgj.id??>
                    编辑
                <#else>
                    新增
                </#if>
            </#if>
        </h4>
    </div>
    <div class="modal-body">
        <div id="errorMessage"><#include "../../message.ftl" /></div>
        <form class="form-horizontal" role="form" id="xcGsgjForm" method="post" action="${absoluteContextPath}/xc/xcGsgj/save">
            <#if xcGsgj??>
                <#if xcGsgj.id??>
                    <input type="hidden" name="id" value="${xcGsgj.id?c}"/>
                <#else>
                    <input type="hidden" name="id" value=""/>
                </#if>
            </#if>
                <div class="row">
          
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">体检编号</label>
                <div class="col-sm-8">
                    <input name="recordNo" value="${xcGsgj.recordNo!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">体检日期</label>
                <div class="col-sm-8">
                    <input name="tjStart" value="${xcGsgj.tjStart!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">卡号</label>
                <div class="col-sm-8">
                    <input name="cardNo" value="${xcGsgj.cardNo!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">姓名</label>
                <div class="col-sm-8">
                    <input name="customerName" value="${xcGsgj.customerName!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">性别</label>
                <div class="col-sm-8">
                    <input name="sex" value="${xcGsgj.sex!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">年龄</label>
                <div class="col-sm-8">
                    <input name="age" value="${xcGsgj.age!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">联系电话</label>
                <div class="col-sm-8">
                    <input name="phone" value="${xcGsgj.phone!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">身份证号</label>
                <div class="col-sm-8">
                    <input name="idNo" value="${xcGsgj.idNo!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">体重</label>
                <div class="col-sm-8">
                    <input name="weight" value="${xcGsgj.weight!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">疾病诊断</label>
                <div class="col-sm-8">
                    <input name="disease" value="${xcGsgj.disease!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">总检日期</label>
                <div class="col-sm-8">
                    <input name="ZDate" value="${xcGsgj.ZDate!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">领取状态</label>
                <div class="col-sm-8">
                <@select name="status" value="${xcGsgj.status!''}" list=lqztList class="form-control"/>

                    <#--<input name="status" value="${xcGsgj.status!''}" type="text" class="form-control"/>-->
                </div>
            </div>
                <div class="form-group col-md-3">
                    <label class="col-sm-4 control-label">单位</label>
                    <div class="col-sm-8">
                        <input name="spareA" value="${xcGsgj.spareA!''}" type="text" class="form-control"/>
                    </div>
                </div>
                <div class="form-group col-md-3">
                    <label class="col-sm-4 control-label">体检ID</label>
                    <div class="col-sm-8">
                        <input name="spareB" value="${xcGsgj.spareB!''}" type="text" class="form-control"/>
                    </div>
                </div>

                <div class="form-group col-md-3">
                    <label class="col-sm-4 control-label">跟进等级</label>
                    <div class="col-sm-8">
                    <@select name="spareE" value="${xcGsgj.spareE!''}" list=vipList class="form-control"/>

                    <#--<input name="status" value="${xcGsgj.status!''}" type="text" class="form-control"/>-->
                    </div>
                </div>
                <div class="form-group col-md-3">
                    <label class="col-sm-4 control-label">是否促成</label>
                    <div class="col-sm-8">
                    <@select name="whether" value="${xcGsgj.whether!''}" list=whetherList class="form-control"/>
                    </div>
                </div>
                 <div class="form-group col-md-3">
                        <label class="col-sm-4 control-label">第一次跟进人</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <input name="userNameFg" value="${xcGsgj.userNameFg!''}" type="hidden"
                                       type="hidden" class="form-control"/>
                                <input name="userName" id="userName2" value="${xcGsgj.userName!''}"
                                       type="text" class="form-control" readonly="true">
                                <span class="input-group-addon" onclick="doSelctReferralsUser(this);"><i
                                        class="fa fa-search"></i></span>
                            </div>
                        </div>
                    </div>
                <div class="form-group col-md-3">
                    <label class="col-sm-4 control-label">第一次讲解医生</label>

                    <div class="col-sm-8">
                        <div class="input-group">
                            <input name="doctorId" value="${xcGsgj.doctorId!''}" type="hidden"
                                   type="hidden" class="form-control"/>
                            <input name="doctorName" id="doctorName2" value="${xcGsgj.doctorName!''}"
                                   type="text" class="form-control" readonly="true">
                                <span class="input-group-addon" onclick="doSelctDoctor(this);"><i
                                        class="fa fa-search"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-12">
                    <label class="col-sm-1 control-label">第一次讲解内容</label>
                    <div class="col-sm-10">
                        <textarea name="oneExplain" class="form-control"
                                  style="width: 1110px"    rows="2">${xcGsgj.oneExplain!''}</textarea>                   </div>
                </div>
            </div>
                <div class="row">


                        <div class="form-group col-md-3">
                            <label class="col-sm-4 control-label">第二次跟进人</label>
                            <div class="col-sm-8">
                                <div class="input-group">
                                    <input name="twoFollowId"  type="hidden"
                                           type="hidden" class="form-control"/>
                                    <input name="twoFollow" id="twoFollow" value="${xcGsgj.twoFollow!''}"
                                           type="text" class="form-control" readonly="true">
                                    <span class="input-group-addon" onclick="doTwoFollowUser(this);"><i
                                            class="fa fa-search"></i></span>
                                </div>
                            </div>
                        </div>

                    <div class="form-group col-md-3">
                        <label class="col-sm-4 control-label">第二次跟进日期</label>
                        <div class="col-sm-8">
                            <input name="twoFollowDate" value="${xcGsgj.twoFollowDate!''}" type="text" class="form-control"/>
                        </div>
                    </div>

                        <div class="form-group col-md-3">
                            <label class="col-sm-4 control-label">第二次讲解医生</label>

                            <div class="col-sm-8">
                                <div class="input-group">
                                    <input name="twoDoctorId"  type="hidden"
                                           type="hidden" class="form-control"/>
                                    <input name="twoDoctorName" id="twoDoctorName" value="${xcGsgj.twoDoctorName!''}"
                                           type="text" class="form-control" readonly="true">
                                    <span class="input-group-addon" onclick="doSelctTwoDoctor(this);"><i
                                            class="fa fa-search"></i></span>
                                </div>
                            </div>
                        </div>


                    <div class="form-group col-md-3">
                        <label class="col-sm-4 control-label">下次跟进日期</label>
                        <div class="col-sm-8">
                            <input name="nextTjDate" value="${xcGsgj.nextTjDate!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                </div>

            <div class="row">
                <div class="form-group col-md-12">
                    <label class="col-sm-1 control-label">第二次讲解内容</label>
                    <div class="col-sm-10">
                        <textarea name="twoExplain" class="form-control"
                                  style="width: 1110px"    rows="2">${xcGsgj.twoExplain!''}</textarea>                   </div>
                </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button type="button" class="btn btn-primary" onclick="save();">保存</button>
    </div>
</div>
</div>
<script>
    function save() {
        $("#" + "xcGsgjForm").ajaxSubmit({
            success:function(data) {
                data = JSON.parse(data);
                if (data.returnCode == 1) {
                    $('#myModal').modal("hide");
                    $.showMessage({parentId:"showMessage",message:"信息保存成功！",type:"success"});
                    refreshTable();
                } else {
                    $.showMessage({parentId:"errorMessage",message:"<strong>错误信息</strong>：" + data.returnMsg,type:"error"});
                }
            }
        });
    }


    $(function () {
        $("input[name=tjStart]").focus(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});

        })

        $("input[name=ZDate]").focus(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        })

        $("input[name=twoFollowDate]").focus(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        })
        $("input[name=nextTjDate]").focus(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        })

        $("div[class='tooltip fade top in']").hide();
    });

</script>